home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / ras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  31.6 KB  |  1,181 lines

  1. /* Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
  2. **
  3. ** ras.h
  4. ** Remote Access external API
  5. ** Public header for external API clients
  6. **
  7. ** WINVER values in this file:
  8. **      WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
  9. **      WINVER = 0x400 = Windows 95, Windows NT SUR (default)
  10. **      WINVER > 0x400 = Windows NT SUR enhancements
  11. */
  12.  
  13. #ifndef _RAS_H_
  14. #define _RAS_H_
  15. #pragma option push -b
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. #ifndef UNLEN
  22.  
  23. #include <lmcons.h>
  24.  
  25. #endif
  26.  
  27.  
  28. #include <pshpack4.h>
  29.  
  30.  
  31. #define RAS_MaxDeviceType     16
  32. #define RAS_MaxPhoneNumber    128
  33. #define RAS_MaxIpAddress      15
  34. #define RAS_MaxIpxAddress     21
  35.  
  36. #if (WINVER >= 0x400)
  37. #define RAS_MaxEntryName      256
  38. #define RAS_MaxDeviceName     128
  39. #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
  40. #else
  41. #define RAS_MaxEntryName      20
  42. #define RAS_MaxDeviceName     32
  43. #define RAS_MaxCallbackNumber 48
  44. #endif
  45.  
  46. #define RAS_MaxAreaCode       10
  47. #define RAS_MaxPadType        32
  48. #define RAS_MaxX25Address     200
  49. #define RAS_MaxFacilities     200
  50. #define RAS_MaxUserData       200
  51.  
  52. DECLARE_HANDLE( HRASCONN );
  53. #define LPHRASCONN HRASCONN*
  54.  
  55.  
  56. /* Identifies an active RAS connection.  (See RasEnumConnections)
  57. */
  58. #define RASCONNW struct tagRASCONNW
  59. RASCONNW
  60. {
  61.     DWORD    dwSize;
  62.     HRASCONN hrasconn;
  63.     WCHAR    szEntryName[ RAS_MaxEntryName + 1 ];
  64.  
  65. #if (WINVER >= 0x400)
  66.     WCHAR    szDeviceType[ RAS_MaxDeviceType + 1 ];
  67.     WCHAR    szDeviceName[ RAS_MaxDeviceName + 1 ];
  68. #endif
  69. #if (WINVER >= 0x401)
  70.     WCHAR    szPhonebook [ MAX_PATH ];
  71.     DWORD    dwSubEntry;
  72. #endif
  73. };
  74.  
  75. #define RASCONNA struct tagRASCONNA
  76. RASCONNA
  77. {
  78.     DWORD    dwSize;
  79.     HRASCONN hrasconn;
  80.     CHAR     szEntryName[ RAS_MaxEntryName + 1 ];
  81.  
  82. #if (WINVER >= 0x400)
  83.     CHAR     szDeviceType[ RAS_MaxDeviceType + 1 ];
  84.     CHAR     szDeviceName[ RAS_MaxDeviceName + 1 ];
  85. #endif
  86. #if (WINVER >= 0x401)
  87.     CHAR     szPhonebook [ MAX_PATH ];
  88.     DWORD    dwSubEntry;
  89. #endif
  90. };
  91.  
  92. #ifdef UNICODE
  93. #define RASCONN RASCONNW
  94. #else
  95. #define RASCONN RASCONNA
  96. #endif
  97.  
  98. #define LPRASCONNW RASCONNW*
  99. #define LPRASCONNA RASCONNA*
  100. #define LPRASCONN  RASCONN*
  101.  
  102.  
  103. /* Enumerates intermediate states to a connection.  (See RasDial)
  104. */
  105. #define RASCS_PAUSED 0x1000
  106. #define RASCS_DONE   0x2000
  107.  
  108. #define RASCONNSTATE enum tagRASCONNSTATE
  109. RASCONNSTATE
  110. {
  111.     RASCS_OpenPort = 0,
  112.     RASCS_PortOpened,
  113.     RASCS_ConnectDevice,
  114.     RASCS_DeviceConnected,
  115.     RASCS_AllDevicesConnected,
  116.     RASCS_Authenticate,
  117.     RASCS_AuthNotify,
  118.     RASCS_AuthRetry,
  119.     RASCS_AuthCallback,
  120.     RASCS_AuthChangePassword,
  121.     RASCS_AuthProject,
  122.     RASCS_AuthLinkSpeed,
  123.     RASCS_AuthAck,
  124.     RASCS_ReAuthenticate,
  125.     RASCS_Authenticated,
  126.     RASCS_PrepareForCallback,
  127.     RASCS_WaitForModemReset,
  128.     RASCS_WaitForCallback,
  129.     RASCS_Projected,
  130.  
  131. #if (WINVER >= 0x400)
  132.     RASCS_StartAuthentication,
  133.     RASCS_CallbackComplete,
  134.     RASCS_LogonNetwork,
  135. #endif
  136.     RASCS_SubEntryConnected,
  137.     RASCS_SubEntryDisconnected,
  138.  
  139.     RASCS_Interactive = RASCS_PAUSED,
  140.     RASCS_RetryAuthentication,
  141.     RASCS_CallbackSetByCaller,
  142.     RASCS_PasswordExpired,
  143.  
  144.     RASCS_Connected = RASCS_DONE,
  145.     RASCS_Disconnected
  146. };
  147.  
  148. #define LPRASCONNSTATE RASCONNSTATE*
  149.  
  150.  
  151. /* Describes the status of a RAS connection.  (See RasConnectionStatus)
  152. */
  153. #define RASCONNSTATUSW struct tagRASCONNSTATUSW
  154. RASCONNSTATUSW
  155. {
  156.     DWORD        dwSize;
  157.     RASCONNSTATE rasconnstate;
  158.     DWORD        dwError;
  159.     WCHAR        szDeviceType[ RAS_MaxDeviceType + 1 ];
  160.     WCHAR        szDeviceName[ RAS_MaxDeviceName + 1 ];
  161. #if (WINVER >= 0x401)
  162.     WCHAR        szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  163. #endif
  164. };
  165.  
  166. #define RASCONNSTATUSA struct tagRASCONNSTATUSA
  167. RASCONNSTATUSA
  168. {
  169.     DWORD        dwSize;
  170.     RASCONNSTATE rasconnstate;
  171.     DWORD        dwError;
  172.     CHAR         szDeviceType[ RAS_MaxDeviceType + 1 ];
  173.     CHAR         szDeviceName[ RAS_MaxDeviceName + 1 ];
  174. #if (WINVER >= 0x401)
  175.     CHAR         szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  176. #endif
  177. };
  178.  
  179. #ifdef UNICODE
  180. #define RASCONNSTATUS RASCONNSTATUSW
  181. #else
  182. #define RASCONNSTATUS RASCONNSTATUSA
  183. #endif
  184.  
  185. #define LPRASCONNSTATUSW RASCONNSTATUSW*
  186. #define LPRASCONNSTATUSA RASCONNSTATUSA*
  187. #define LPRASCONNSTATUS  RASCONNSTATUS*
  188.  
  189.  
  190. /* Describes connection establishment parameters.  (See RasDial)
  191. */
  192. #define RASDIALPARAMSW struct tagRASDIALPARAMSW
  193. RASDIALPARAMSW
  194. {
  195.     DWORD dwSize;
  196.     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  197.     WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  198.     WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  199.     WCHAR szUserName[ UNLEN + 1 ];
  200.     WCHAR szPassword[ PWLEN + 1 ];
  201.     WCHAR szDomain[ DNLEN + 1 ];
  202. #if (WINVER >= 0x401)
  203.     DWORD dwSubEntry;
  204.     DWORD dwCallbackId;
  205. #endif
  206. };
  207.  
  208. #define RASDIALPARAMSA struct tagRASDIALPARAMSA
  209. RASDIALPARAMSA
  210. {
  211.     DWORD dwSize;
  212.     CHAR  szEntryName[ RAS_MaxEntryName + 1 ];
  213.     CHAR  szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  214.     CHAR  szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  215.     CHAR  szUserName[ UNLEN + 1 ];
  216.     CHAR  szPassword[ PWLEN + 1 ];
  217.     CHAR  szDomain[ DNLEN + 1 ];
  218. #if (WINVER >= 0x401)
  219.     DWORD dwSubEntry;
  220.     DWORD dwCallbackId;
  221. #endif
  222. };
  223.  
  224. #ifdef UNICODE
  225. #define RASDIALPARAMS RASDIALPARAMSW
  226. #else
  227. #define RASDIALPARAMS RASDIALPARAMSA
  228. #endif
  229.  
  230. #define LPRASDIALPARAMSW RASDIALPARAMSW*
  231. #define LPRASDIALPARAMSA RASDIALPARAMSA*
  232. #define LPRASDIALPARAMS  RASDIALPARAMS*
  233.  
  234.  
  235. /* Describes extended connection establishment options.  (See RasDial)
  236. */
  237. #define RASDIALEXTENSIONS struct tagRASDIALEXTENSIONS
  238. RASDIALEXTENSIONS
  239. {
  240.     DWORD dwSize;
  241.     DWORD dwfOptions;
  242.     HWND  hwndParent;
  243.     DWORD reserved;
  244. };
  245.  
  246. #define LPRASDIALEXTENSIONS RASDIALEXTENSIONS*
  247.  
  248. /* 'dwfOptions' bit flags.
  249. */
  250. #define RDEOPT_UsePrefixSuffix           0x00000001
  251. #define RDEOPT_PausedStates              0x00000002
  252. #define RDEOPT_IgnoreModemSpeaker        0x00000004
  253. #define RDEOPT_SetModemSpeaker           0x00000008
  254. #define RDEOPT_IgnoreSoftwareCompression 0x00000010
  255. #define RDEOPT_SetSoftwareCompression    0x00000020
  256. #define RDEOPT_DisableConnectedUI        0x00000040
  257. #define RDEOPT_DisableReconnectUI        0x00000080
  258. #define RDEOPT_DisableReconnect          0x00000100
  259. #define RDEOPT_NoUser                    0x00000200
  260. #define RDEOPT_PauseOnScript             0x00000400
  261.  
  262.  
  263. /* Describes an enumerated RAS phone book entry name.  (See RasEntryEnum)
  264. */
  265. #define RASENTRYNAMEW struct tagRASENTRYNAMEW
  266. RASENTRYNAMEW
  267. {
  268.     DWORD dwSize;
  269.     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  270. };
  271.  
  272. #define RASENTRYNAMEA struct tagRASENTRYNAMEA
  273. RASENTRYNAMEA
  274. {
  275.     DWORD dwSize;
  276.     CHAR  szEntryName[ RAS_MaxEntryName + 1 ];
  277. };
  278.  
  279. #ifdef UNICODE
  280. #define RASENTRYNAME RASENTRYNAMEW
  281. #else
  282. #define RASENTRYNAME RASENTRYNAMEA
  283. #endif
  284.  
  285. #define LPRASENTRYNAMEW RASENTRYNAMEW*
  286. #define LPRASENTRYNAMEA RASENTRYNAMEA*
  287. #define LPRASENTRYNAME  RASENTRYNAME*
  288.  
  289.  
  290. /* Protocol code to projection data structure mapping.
  291. */
  292. #define RASPROJECTION enum tagRASPROJECTION
  293. RASPROJECTION
  294. {
  295.     RASP_Amb = 0x10000,
  296.     RASP_PppNbf = 0x803F,
  297.     RASP_PppIpx = 0x802B,
  298.     RASP_PppIp = 0x8021,
  299.     RASP_PppLcp = 0xC021,
  300.     RASP_Slip = 0x20000
  301. };
  302.  
  303. #define LPRASPROJECTION RASPROJECTION*
  304.  
  305.  
  306. /* Describes the result of a RAS AMB (Authentication Message Block)
  307. ** projection.  This protocol is used with NT 3.1 and OS/2 1.3 downlevel
  308. ** RAS servers.
  309. */
  310. #define RASAMBW struct tagRASAMBW
  311. RASAMBW
  312. {
  313.     DWORD dwSize;
  314.     DWORD dwError;
  315.     WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  316.     BYTE  bLana;
  317. };
  318.  
  319. #define RASAMBA struct tagRASAMBA
  320. RASAMBA
  321. {
  322.     DWORD dwSize;
  323.     DWORD dwError;
  324.     CHAR  szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  325.     BYTE  bLana;
  326. };
  327.  
  328. #ifdef UNICODE
  329. #define RASAMB RASAMBW
  330. #else
  331. #define RASAMB RASAMBA
  332. #endif
  333.  
  334. #define LPRASAMBW RASAMBW*
  335. #define LPRASAMBA RASAMBA*
  336. #define LPRASAMB  RASAMB*
  337.  
  338.  
  339. /* Describes the result of a PPP NBF (NetBEUI) projection.
  340. */
  341. #define RASPPPNBFW struct tagRASPPPNBFW
  342. RASPPPNBFW
  343. {
  344.     DWORD dwSize;
  345.     DWORD dwError;
  346.     DWORD dwNetBiosError;
  347.     WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  348.     WCHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  349.     BYTE  bLana;
  350. };
  351.  
  352. #define RASPPPNBFA struct tagRASPPPNBFA
  353. RASPPPNBFA
  354. {
  355.     DWORD dwSize;
  356.     DWORD dwError;
  357.     DWORD dwNetBiosError;
  358.     CHAR  szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  359.     CHAR  szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  360.     BYTE  bLana;
  361. };
  362.  
  363. #ifdef UNICODE
  364. #define RASPPPNBF RASPPPNBFW
  365. #else
  366. #define RASPPPNBF RASPPPNBFA
  367. #endif
  368.  
  369. #define LPRASPPPNBFW RASPPPNBFW*
  370. #define LPRASPPPNBFA RASPPPNBFA*
  371. #define LPRASPPPNBF  RASPPPNBF*
  372.  
  373.  
  374. /* Describes the results of a PPP IPX (Internetwork Packet Exchange)
  375. ** projection.
  376. */
  377. #define RASPPPIPXW struct tagRASIPXW
  378. RASPPPIPXW
  379. {
  380.     DWORD dwSize;
  381.     DWORD dwError;
  382.     WCHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  383. };
  384.  
  385.  
  386. #define RASPPPIPXA struct tagRASPPPIPXA
  387. RASPPPIPXA
  388. {
  389.     DWORD dwSize;
  390.     DWORD dwError;
  391.     CHAR  szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  392. };
  393.  
  394. #ifdef UNICODE
  395. #define RASPPPIPX RASPPPIPXW
  396. #else
  397. #define RASPPPIPX RASPPPIPXA
  398. #endif
  399.  
  400. #define LPRASPPPIPXW RASPPPIPXW*
  401. #define LPRASPPPIPXA RASPPPIPXA*
  402. #define LPRASPPPIPX  RASPPPIPX*
  403.  
  404.  
  405. /* Describes the results of a PPP IP (Internet) projection.
  406. */
  407. #define RASPPPIPW struct tagRASPPPIPW
  408. RASPPPIPW
  409. {
  410.     DWORD dwSize;
  411.     DWORD dwError;
  412.     WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  413.  
  414. #ifndef WINNT35COMPATIBLE
  415.  
  416.     /* This field was added between Windows NT 3.51 beta and Windows NT 3.51
  417.     ** final, and between Windows 95 M8 beta and Windows 95 final.  If you do
  418.     ** not require the server address and wish to retrieve PPP IP information
  419.     ** from Windows NT 3.5 or early Windows NT 3.51 betas, or on early Windows
  420.     ** 95 betas, define WINNT35COMPATIBLE.
  421.     **
  422.     ** The server IP address is not provided by all PPP implementations,
  423.     ** though Windows NT server's do provide it.
  424.     */
  425.     WCHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  426.  
  427. #endif
  428. };
  429.  
  430. #define RASPPPIPA struct tagRASPPPIPA
  431. RASPPPIPA
  432. {
  433.     DWORD dwSize;
  434.     DWORD dwError;
  435.     CHAR  szIpAddress[ RAS_MaxIpAddress + 1 ];
  436.  
  437. #ifndef WINNT35COMPATIBLE
  438.  
  439.     /* See RASPPPIPW comment.
  440.     */
  441.     CHAR  szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  442.  
  443. #endif
  444. };
  445.  
  446. #ifdef UNICODE
  447. #define RASPPPIP RASPPPIPW
  448. #else
  449. #define RASPPPIP RASPPPIPA
  450. #endif
  451.  
  452. #define LPRASPPPIPW RASPPPIPW*
  453. #define LPRASPPPIPA RASPPPIPA*
  454. #define LPRASPPPIP  RASPPPIP*
  455.  
  456.  
  457. /* Describes the results of a PPP LCP/multi-link negotiation.
  458. */
  459. #define RASPPPLCP struct tagRASPPPLCP
  460. RASPPPLCP
  461. {
  462.     DWORD dwSize;
  463.     BOOL  fBundled;
  464. };
  465.  
  466. #define LPRASPPPLCP RASPPPLCP*
  467.  
  468.  
  469. /* Describes the results of a SLIP (Serial Line IP) projection.
  470. */
  471. #define RASSLIPW struct tagRASSLIPW
  472. RASSLIPW
  473. {
  474.     DWORD dwSize;
  475.     DWORD dwError;
  476.     WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  477. };
  478.  
  479.  
  480. #define RASSLIPA struct tagRASSLIPA
  481. RASSLIPA
  482. {
  483.     DWORD dwSize;
  484.     DWORD dwError;
  485.     CHAR  szIpAddress[ RAS_MaxIpAddress + 1 ];
  486. };
  487.  
  488. #ifdef UNICODE
  489. #define RASSLIP RASSLIPW
  490. #else
  491. #define RASSLIP RASSLIPA
  492. #endif
  493.  
  494. #define LPRASSLIPW RASSLIPW*
  495. #define LPRASSLIPA RASSLIPA*
  496. #define LPRASSLIP  RASSLIP*
  497.  
  498.  
  499. /* If using RasDial message notifications, get the notification message code
  500. ** by passing this string to the RegisterWindowMessageA() API.
  501. ** WM_RASDIALEVENT is used only if a unique message cannot be registered.
  502. */
  503. #define RASDIALEVENT    "RasDialEvent"
  504. #define WM_RASDIALEVENT 0xCCCD
  505.  
  506. /* Prototypes for caller's RasDial callback handler.  Arguments are the
  507. ** message ID (currently always WM_RASDIALEVENT), the current RASCONNSTATE and
  508. ** the error that has occurred (or 0 if none).  Extended arguments are the
  509. ** handle of the RAS connection and an extended error code.
  510. **
  511. ** For RASDIALFUNC2, subsequent callback notifications for all
  512. ** subentries can be cancelled by returning FALSE.
  513. */
  514. typedef VOID (WINAPI *RASDIALFUNC)( UINT, RASCONNSTATE, DWORD );
  515. typedef VOID (WINAPI *RASDIALFUNC1)( HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
  516. typedef DWORD (WINAPI *RASDIALFUNC2)( DWORD, DWORD, HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
  517.  
  518.  
  519. /* Information describing a RAS-capable device.
  520. */
  521. #define RASDEVINFOW struct tagRASDEVINFOW
  522. RASDEVINFOW
  523. {
  524.     DWORD    dwSize;
  525.     WCHAR    szDeviceType[ RAS_MaxDeviceType + 1 ];
  526.     WCHAR    szDeviceName[ RAS_MaxDeviceName + 1 ];
  527. };
  528.  
  529. #define RASDEVINFOA struct tagRASDEVINFOA
  530. RASDEVINFOA
  531. {
  532.     DWORD    dwSize;
  533.     CHAR     szDeviceType[ RAS_MaxDeviceType + 1 ];
  534.     CHAR     szDeviceName[ RAS_MaxDeviceName + 1 ];
  535. };
  536.  
  537. #ifdef UNICODE
  538. #define RASDEVINFO RASDEVINFOW
  539. #else
  540. #define RASDEVINFO RASDEVINFOA
  541. #endif
  542.  
  543. #define LPRASDEVINFOW RASDEVINFOW*
  544. #define LPRASDEVINFOA RASDEVINFOA*
  545. #define LPRASDEVINFO  RASDEVINFO*
  546.  
  547. /* RAS country information (currently retrieved from TAPI).
  548. */
  549. #define RASCTRYINFO struct RASCTRYINFO
  550. RASCTRYINFO
  551. {
  552.     DWORD   dwSize;
  553.     DWORD   dwCountryID;
  554.     DWORD   dwNextCountryID;
  555.     DWORD   dwCountryCode;
  556.     DWORD   dwCountryNameOffset;
  557. };
  558.  
  559. /* There is currently no difference between
  560. ** RASCTRYINFOA and RASCTRYINFOW.  This may
  561. ** change in the future.
  562. */
  563. #define RASCTRYINFOW   RASCTRYINFO
  564. #define RASCTRYINFOA   RASCTRYINFO
  565.  
  566. #define LPRASCTRYINFOW RASCTRYINFOW*
  567. #define LPRASCTRYINFOA RASCTRYINFOW*
  568. #define LPRASCTRYINFO  RASCTRYINFO*
  569.  
  570. /* A RAS IP address.
  571. */
  572. #define RASIPADDR struct RASIPADDR
  573. RASIPADDR
  574. {
  575.     BYTE a;
  576.     BYTE b;
  577.     BYTE c;
  578.     BYTE d;
  579. };
  580.  
  581. /* A RAS phone book entry.
  582. */
  583. #define RASENTRYA struct tagRASENTRYA
  584. RASENTRYA
  585. {
  586.     DWORD       dwSize;
  587.     DWORD       dwfOptions;
  588.     //
  589.     // Location/phone number.
  590.     //
  591.     DWORD       dwCountryID;
  592.     DWORD       dwCountryCode;
  593.     CHAR        szAreaCode[ RAS_MaxAreaCode + 1 ];
  594.     CHAR        szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  595.     DWORD       dwAlternateOffset;
  596.     //
  597.     // PPP/Ip
  598.     //
  599.     RASIPADDR   ipaddr;
  600.     RASIPADDR   ipaddrDns;
  601.     RASIPADDR   ipaddrDnsAlt;
  602.     RASIPADDR   ipaddrWins;
  603.     RASIPADDR   ipaddrWinsAlt;
  604.     //
  605.     // Framing
  606.     //
  607.     DWORD       dwFrameSize;
  608.     DWORD       dwfNetProtocols;
  609.     DWORD       dwFramingProtocol;
  610.     //
  611.     // Scripting
  612.     //
  613.     CHAR        szScript[ MAX_PATH ];
  614.     //
  615.     // AutoDial
  616.     //
  617.     CHAR        szAutodialDll[ MAX_PATH ];
  618.     CHAR        szAutodialFunc[ MAX_PATH ];
  619.     //
  620.     // Device
  621.     //
  622.     CHAR        szDeviceType[ RAS_MaxDeviceType + 1 ];
  623.     CHAR        szDeviceName[ RAS_MaxDeviceName + 1 ];
  624.     //
  625.     // X.25
  626.     //
  627.     CHAR        szX25PadType[ RAS_MaxPadType + 1 ];
  628.     CHAR        szX25Address[ RAS_MaxX25Address + 1 ];
  629.     CHAR        szX25Facilities[ RAS_MaxFacilities + 1 ];
  630.     CHAR        szX25UserData[ RAS_MaxUserData + 1 ];
  631.     DWORD       dwChannels;
  632.     //
  633.     // Reserved
  634.     //
  635.     DWORD       dwReserved1;
  636.     DWORD       dwReserved2;
  637. #if (WINVER >= 0x401)
  638.     //
  639.     // Multilink
  640.     //
  641.     DWORD       dwSubEntries;
  642.     DWORD       dwDialMode;
  643.     DWORD       dwDialExtraPercent;
  644.     DWORD       dwDialExtraSampleSeconds;
  645.     DWORD       dwHangUpExtraPercent;
  646.     DWORD       dwHangUpExtraSampleSeconds;
  647.     //
  648.     // Idle timeout
  649.     //
  650.     DWORD       dwIdleDisconnectSeconds;
  651. #endif
  652. };
  653.  
  654. #define RASENTRYW struct tagRASENTRYW
  655. RASENTRYW
  656. {
  657.     DWORD       dwSize;
  658.     DWORD       dwfOptions;
  659.     //
  660.     // Location/phone number
  661.     //
  662.     DWORD       dwCountryID;
  663.     DWORD       dwCountryCode;
  664.     WCHAR       szAreaCode[ RAS_MaxAreaCode + 1 ];
  665.     WCHAR       szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  666.     DWORD       dwAlternateOffset;
  667.     //
  668.     // PPP/Ip
  669.     //
  670.     RASIPADDR   ipaddr;
  671.     RASIPADDR   ipaddrDns;
  672.     RASIPADDR   ipaddrDnsAlt;
  673.     RASIPADDR   ipaddrWins;
  674.     RASIPADDR   ipaddrWinsAlt;
  675.     //
  676.     // Framing
  677.     //
  678.     DWORD       dwFrameSize;
  679.     DWORD       dwfNetProtocols;
  680.     DWORD       dwFramingProtocol;
  681.     //
  682.     // Scripting
  683.     //
  684.     WCHAR       szScript[ MAX_PATH ];
  685.     //
  686.     // AutoDial
  687.     //
  688.     WCHAR       szAutodialDll[ MAX_PATH ];
  689.     WCHAR       szAutodialFunc[ MAX_PATH ];
  690.     //
  691.     // Device
  692.     //
  693.     WCHAR       szDeviceType[ RAS_MaxDeviceType + 1 ];
  694.     WCHAR       szDeviceName[ RAS_MaxDeviceName + 1 ];
  695.     //
  696.     // X.25
  697.     //
  698.     WCHAR       szX25PadType[ RAS_MaxPadType + 1 ];
  699.     WCHAR       szX25Address[ RAS_MaxX25Address + 1 ];
  700.     WCHAR       szX25Facilities[ RAS_MaxFacilities + 1 ];
  701.     WCHAR       szX25UserData[ RAS_MaxUserData + 1 ];
  702.     DWORD       dwChannels;
  703.     //
  704.     // Reserved
  705.     //
  706.     DWORD       dwReserved1;
  707.     DWORD       dwReserved2;
  708. #if (WINVER >= 0x401)
  709.     //
  710.     // Multilink
  711.     //
  712.     DWORD       dwSubEntries;
  713.     DWORD       dwDialMode;
  714.     DWORD       dwDialExtraPercent;
  715.     DWORD       dwDialExtraSampleSeconds;
  716.     DWORD       dwHangUpExtraPercent;
  717.     DWORD       dwHangUpExtraSampleSeconds;
  718.     //
  719.     // Idle timeout
  720.     //
  721.     DWORD       dwIdleDisconnectSeconds;
  722. #endif
  723. };
  724.  
  725. #ifdef UNICODE
  726. #define RASENTRY RASENTRYW
  727. #else
  728. #define RASENTRY RASENTRYA
  729. #endif
  730.  
  731. #define LPRASENTRYW RASENTRYW*
  732. #define LPRASENTRYA RASENTRYA*
  733. #define LPRASENTRY  RASENTRY*
  734.  
  735. /* RASENTRY 'dwfOptions' bit flags.
  736. */
  737. #define RASEO_UseCountryAndAreaCodes    0x00000001
  738. #define RASEO_SpecificIpAddr            0x00000002
  739. #define RASEO_SpecificNameServers       0x00000004
  740. #define RASEO_IpHeaderCompression       0x00000008
  741. #define RASEO_RemoteDefaultGateway      0x00000010
  742. #define RASEO_DisableLcpExtensions      0x00000020
  743. #define RASEO_TerminalBeforeDial        0x00000040
  744. #define RASEO_TerminalAfterDial         0x00000080
  745. #define RASEO_ModemLights               0x00000100
  746. #define RASEO_SwCompression             0x00000200
  747. #define RASEO_RequireEncryptedPw        0x00000400
  748. #define RASEO_RequireMsEncryptedPw      0x00000800
  749. #define RASEO_RequireDataEncryption     0x00001000
  750. #define RASEO_NetworkLogon              0x00002000
  751. #define RASEO_UseLogonCredentials       0x00004000
  752. #define RASEO_PromoteAlternates         0x00008000
  753. #if (WINVER >= 0x401)
  754. #define RASEO_SecureLocalFiles          0x00010000
  755. #endif
  756.  
  757. /* RASENTRY 'dwProtocols' bit flags.
  758. */
  759. #define RASNP_NetBEUI                   0x00000001
  760. #define RASNP_Ipx                       0x00000002
  761. #define RASNP_Ip                        0x00000004
  762.  
  763. /* RASENTRY 'dwFramingProtocols' bit flags.
  764. */
  765. #define RASFP_Ppp                       0x00000001
  766. #define RASFP_Slip                      0x00000002
  767. #define RASFP_Ras                       0x00000004
  768.  
  769. /* RASENTRY 'szDeviceType' default strings.
  770. */
  771. #define RASDT_Modem                     TEXT("modem")
  772. #define RASDT_Isdn                      TEXT("isdn")
  773. #define RASDT_X25                       TEXT("x25")
  774.  
  775. /* Old AutoDial DLL function prototype.
  776. **
  777. ** This prototype is documented for backward-compatibility
  778. ** purposes only.  It is superceded by the RASADFUNCA
  779. ** and RASADFUNCW definitions below.  DO NOT USE THIS
  780. ** PROTOTYPE IN NEW CODE.  SUPPORT FOR IT MAY BE REMOVED
  781. ** IN FUTURE VERSIONS OF RAS.
  782. */
  783. typedef BOOL (WINAPI *ORASADFUNC)( HWND, LPSTR, DWORD, LPDWORD );
  784.  
  785. #if (WINVER >= 0x401)
  786. /* Flags for RasConnectionNotification().
  787. */
  788. #define RASCN_Connection        0x00000001
  789. #define RASCN_Disconnection     0x00000002
  790. #define RASCN_BandwidthAdded    0x00000004
  791. #define RASCN_BandwidthRemoved  0x00000008
  792.  
  793. /* RASENTRY 'dwDialMode' values.
  794. */
  795. #define RASEDM_DialAll                  1
  796. #define RASEDM_DialAsNeeded             2
  797.  
  798. /* RASENTRY 'dwIdleDisconnectSeconds' constants.
  799. */
  800. #define RASIDS_Disabled                 0xffffffff
  801. #define RASIDS_UseGlobalValue           0
  802.  
  803. /* AutoDial DLL function parameter block.
  804. */
  805. #define RASADPARAMS struct tagRASADPARAMS
  806. RASADPARAMS
  807. {
  808.     DWORD       dwSize;
  809.     HWND        hwndOwner;
  810.     DWORD       dwFlags;
  811.     LONG        xDlg;
  812.     LONG        yDlg;
  813. };
  814.  
  815. #define LPRASADPARAMS RASADPARAMS*
  816.  
  817. /* AutoDial DLL function parameter block 'dwFlags.'
  818. */
  819. #define RASADFLG_PositionDlg            0x00000001
  820.  
  821. /* Prototype AutoDial DLL function.
  822. */
  823. typedef BOOL (WINAPI *RASADFUNCA)( LPSTR, LPSTR, LPRASADPARAMS, LPDWORD );
  824. typedef BOOL (WINAPI *RASADFUNCW)( LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD );
  825.  
  826. #ifdef UNICODE
  827. #define RASADFUNC RASADFUNCW
  828. #else
  829. #define RASADFUNC RASADFUNCA
  830. #endif
  831.  
  832. /* A RAS phone book multilinked sub-entry.
  833. */
  834. #define RASSUBENTRYA struct tagRASSUBENTRYA
  835. RASSUBENTRYA
  836. {
  837.     DWORD       dwSize;
  838.     DWORD       dwfFlags;
  839.     //
  840.     // Device
  841.     //
  842.     CHAR        szDeviceType[ RAS_MaxDeviceType + 1 ];
  843.     CHAR        szDeviceName[ RAS_MaxDeviceName + 1 ];
  844.     //
  845.     // Phone numbers
  846.     //
  847.     CHAR        szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  848.     DWORD       dwAlternateOffset;
  849. };
  850.  
  851. #define RASSUBENTRYW struct tagRASSUBENTRYW
  852. RASSUBENTRYW
  853. {
  854.     DWORD       dwSize;
  855.     DWORD       dwfFlags;
  856.     //
  857.     // Device
  858.     //
  859.     WCHAR       szDeviceType[ RAS_MaxDeviceType + 1 ];
  860.     WCHAR       szDeviceName[ RAS_MaxDeviceName + 1 ];
  861.     //
  862.     // Phone numbers
  863.     //
  864.     WCHAR       szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  865.     DWORD       dwAlternateOffset;
  866. };
  867.  
  868. #ifdef UNICODE
  869. #define RASSUBENTRY RASSUBENTRYW
  870. #else
  871. #define RASSUBENTRY RASSUBENTRYA
  872. #endif
  873.  
  874. #define LPRASSUBENTRYW RASSUBENTRYW*
  875. #define LPRASSUBENTRYA RASSUBENTRYA*
  876. #define LPRASSUBENTRY  RASSUBENTRY*
  877.  
  878. /* Ras{Get,Set}Credentials structure.  These calls
  879. ** supercede Ras{Get,Set}EntryDialParams.
  880. */
  881. #define RASCREDENTIALSA struct tagRASCREDENTIALSA
  882. RASCREDENTIALSA
  883. {
  884.     DWORD dwSize;
  885.     DWORD dwMask;
  886.     CHAR szUserName[ UNLEN + 1 ];
  887.     CHAR szPassword[ PWLEN + 1 ];
  888.     CHAR szDomain[ DNLEN + 1 ];
  889. };
  890.  
  891. #define RASCREDENTIALSW struct tagRASCREDENTIALSW
  892. RASCREDENTIALSW
  893. {
  894.     DWORD dwSize;
  895.     DWORD dwMask;
  896.     WCHAR szUserName[ UNLEN + 1 ];
  897.     WCHAR szPassword[ PWLEN + 1 ];
  898.     WCHAR szDomain[ DNLEN + 1 ];
  899. };
  900.  
  901. #ifdef UNICODE
  902. #define RASCREDENTIALS RASCREDENTIALSW
  903. #else
  904. #define RASCREDENTIALS RASCREDENTIALSA
  905. #endif
  906.  
  907. #define LPRASCREDENTIALSW RASCREDENTIALSW*
  908. #define LPRASCREDENTIALSA RASCREDENTIALSA*
  909. #define LPRASCREDENTIALS  RASCREDENTIALS*
  910.  
  911. /* RASCREDENTIALS 'dwMask' values.
  912. */
  913. #define RASCM_UserName       0x00000001
  914. #define RASCM_Password       0x00000002
  915. #define RASCM_Domain         0x00000004
  916.  
  917. /* AutoDial address properties.
  918. */
  919. #define RASAUTODIALENTRYA struct tagRASAUTODIALENTRYA
  920. RASAUTODIALENTRYA
  921. {
  922.     DWORD dwSize;
  923.     DWORD dwFlags;
  924.     DWORD dwDialingLocation;
  925.     CHAR szEntry[ RAS_MaxEntryName + 1];
  926. };
  927.  
  928. #define RASAUTODIALENTRYW struct tagRASAUTODIALENTRYW
  929. RASAUTODIALENTRYW
  930. {
  931.     DWORD dwSize;
  932.     DWORD dwFlags;
  933.     DWORD dwDialingLocation;
  934.     WCHAR szEntry[ RAS_MaxEntryName + 1];
  935. };
  936.  
  937. #ifdef UNICODE
  938. #define RASAUTODIALENTRY RASAUTODIALENTRYW
  939. #else
  940. #define RASAUTODIALENTRY RASAUTODIALENTRYA
  941. #endif
  942.  
  943. #define LPRASAUTODIALENTRYW RASAUTODIALENTRYW*
  944. #define LPRASAUTODIALENTRYA RASAUTODIALENTRYA*
  945. #define LPRASAUTODIALENTRY  RASAUTODIALENTRY*
  946.  
  947. /* AutoDial control parameter values for
  948. ** Ras{Get,Set}AutodialParam.
  949. */
  950. #define RASADP_DisableConnectionQuery           0
  951. #define RASADP_LoginSessionDisable              1
  952. #define RASADP_SavedAddressesLimit              2
  953. #define RASADP_FailedConnectionTimeout          3
  954. #define RASADP_ConnectionQueryTimeout           4
  955.  
  956. #endif // (WINVER >= 0x401)
  957.  
  958.  
  959. /* External RAS API function prototypes.
  960. */
  961. DWORD APIENTRY RasDialA( LPRASDIALEXTENSIONS, LPSTR, LPRASDIALPARAMSA, DWORD,
  962.                    LPVOID, LPHRASCONN );
  963.  
  964. DWORD APIENTRY RasDialW( LPRASDIALEXTENSIONS, LPWSTR, LPRASDIALPARAMSW, DWORD,
  965.                    LPVOID, LPHRASCONN );
  966.  
  967. DWORD APIENTRY RasEnumConnectionsA( LPRASCONNA, LPDWORD, LPDWORD );
  968.  
  969. DWORD APIENTRY RasEnumConnectionsW( LPRASCONNW, LPDWORD, LPDWORD );
  970.  
  971. DWORD APIENTRY RasEnumEntriesA( LPSTR, LPSTR, LPRASENTRYNAMEA, LPDWORD,
  972.                    LPDWORD );
  973.  
  974. DWORD APIENTRY RasEnumEntriesW( LPWSTR, LPWSTR, LPRASENTRYNAMEW, LPDWORD,
  975.                    LPDWORD );
  976.  
  977. DWORD APIENTRY RasGetConnectStatusA( HRASCONN, LPRASCONNSTATUSA );
  978.  
  979. DWORD APIENTRY RasGetConnectStatusW( HRASCONN, LPRASCONNSTATUSW );
  980.  
  981. DWORD APIENTRY RasGetErrorStringA( UINT, LPSTR, DWORD );
  982.  
  983. DWORD APIENTRY RasGetErrorStringW( UINT, LPWSTR, DWORD );
  984.  
  985. DWORD APIENTRY RasHangUpA( HRASCONN );
  986.  
  987. DWORD APIENTRY RasHangUpW( HRASCONN );
  988.  
  989. DWORD APIENTRY RasGetProjectionInfoA( HRASCONN, RASPROJECTION, LPVOID,
  990.                    LPDWORD );
  991.  
  992. DWORD APIENTRY RasGetProjectionInfoW( HRASCONN, RASPROJECTION, LPVOID,
  993.                    LPDWORD );
  994.  
  995. DWORD APIENTRY RasCreatePhonebookEntryA( HWND, LPSTR );
  996.  
  997. DWORD APIENTRY RasCreatePhonebookEntryW( HWND, LPWSTR );
  998.  
  999. DWORD APIENTRY RasEditPhonebookEntryA( HWND, LPSTR, LPSTR );
  1000.  
  1001. DWORD APIENTRY RasEditPhonebookEntryW( HWND, LPWSTR, LPWSTR );
  1002.  
  1003. DWORD APIENTRY RasSetEntryDialParamsA( LPSTR, LPRASDIALPARAMSA, BOOL );
  1004.  
  1005. DWORD APIENTRY RasSetEntryDialParamsW( LPWSTR, LPRASDIALPARAMSW, BOOL );
  1006.  
  1007. DWORD APIENTRY RasGetEntryDialParamsA( LPSTR, LPRASDIALPARAMSA, LPBOOL );
  1008.  
  1009. DWORD APIENTRY RasGetEntryDialParamsW( LPWSTR, LPRASDIALPARAMSW, LPBOOL );
  1010.  
  1011. DWORD APIENTRY RasEnumDevicesA( LPRASDEVINFOA, LPDWORD, LPDWORD );
  1012.  
  1013. DWORD APIENTRY RasEnumDevicesW( LPRASDEVINFOW, LPDWORD, LPDWORD );
  1014.  
  1015. DWORD APIENTRY RasGetCountryInfoA( LPRASCTRYINFOA, LPDWORD );
  1016.  
  1017. DWORD APIENTRY RasGetCountryInfoW( LPRASCTRYINFOW, LPDWORD );
  1018.  
  1019. DWORD APIENTRY RasGetEntryPropertiesA( LPSTR, LPSTR, LPRASENTRYA, LPDWORD, LPBYTE, LPDWORD );
  1020.  
  1021. DWORD APIENTRY RasGetEntryPropertiesW( LPWSTR, LPWSTR, LPRASENTRYW, LPDWORD, LPBYTE, LPDWORD );
  1022.  
  1023. DWORD APIENTRY RasSetEntryPropertiesA( LPSTR, LPSTR, LPRASENTRYA, DWORD, LPBYTE, DWORD );
  1024.  
  1025. DWORD APIENTRY RasSetEntryPropertiesW( LPWSTR, LPWSTR, LPRASENTRYW, DWORD, LPBYTE, DWORD );
  1026.  
  1027. DWORD APIENTRY RasRenameEntryA( LPSTR, LPSTR, LPSTR );
  1028.  
  1029. DWORD APIENTRY RasRenameEntryW( LPWSTR, LPWSTR, LPWSTR );
  1030.  
  1031. DWORD APIENTRY RasDeleteEntryA( LPSTR, LPSTR );
  1032.  
  1033. DWORD APIENTRY RasDeleteEntryW( LPWSTR, LPWSTR );
  1034.  
  1035. DWORD APIENTRY RasValidateEntryNameA( LPSTR, LPSTR );
  1036.  
  1037. DWORD APIENTRY RasValidateEntryNameW( LPWSTR, LPWSTR );
  1038.  
  1039. #if (WINVER >= 0x401)
  1040. DWORD APIENTRY RasGetSubEntryHandleA( HRASCONN, DWORD, LPHRASCONN );
  1041.  
  1042. DWORD APIENTRY RasGetSubEntryHandleW( HRASCONN, DWORD, LPHRASCONN );
  1043.  
  1044. DWORD APIENTRY RasGetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA);
  1045.  
  1046. DWORD APIENTRY RasGetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW );
  1047.  
  1048. DWORD APIENTRY RasSetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA, BOOL );
  1049.  
  1050. DWORD APIENTRY RasSetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW, BOOL );
  1051.  
  1052. DWORD APIENTRY RasConnectionNotificationA( HRASCONN, HANDLE, DWORD );
  1053.  
  1054. DWORD APIENTRY RasConnectionNotificationW( HRASCONN, HANDLE, DWORD );
  1055.  
  1056. DWORD APIENTRY RasGetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  1057.                     LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD );
  1058.  
  1059. DWORD APIENTRY RasGetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  1060.                     LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD );
  1061.  
  1062. DWORD APIENTRY RasSetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  1063.                     LPRASSUBENTRYA, DWORD, LPBYTE, DWORD );
  1064.  
  1065. DWORD APIENTRY RasSetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  1066.                     LPRASSUBENTRYW, DWORD, LPBYTE, DWORD );
  1067.  
  1068. DWORD APIENTRY RasGetAutodialAddressA( LPSTR, LPDWORD, LPRASAUTODIALENTRYA,
  1069.                     LPDWORD, LPDWORD );
  1070.  
  1071. DWORD APIENTRY RasGetAutodialAddressW( LPWSTR, LPDWORD, LPRASAUTODIALENTRYW,
  1072.                     LPDWORD, LPDWORD);
  1073.  
  1074. DWORD APIENTRY RasSetAutodialAddressA( LPSTR, DWORD, LPRASAUTODIALENTRYA,
  1075.                     DWORD, DWORD );
  1076.  
  1077. DWORD APIENTRY RasSetAutodialAddressW( LPWSTR, DWORD, LPRASAUTODIALENTRYW,
  1078.                     DWORD, DWORD );
  1079.  
  1080. DWORD APIENTRY RasEnumAutodialAddressesA( LPSTR *, LPDWORD, LPDWORD );
  1081.  
  1082. DWORD APIENTRY RasEnumAutodialAddressesW( LPWSTR *, LPDWORD, LPDWORD );
  1083.  
  1084. DWORD APIENTRY RasGetAutodialEnableA( DWORD, LPBOOL );
  1085.  
  1086. DWORD APIENTRY RasGetAutodialEnableW( DWORD, LPBOOL );
  1087.  
  1088. DWORD APIENTRY RasSetAutodialEnableA( DWORD, BOOL );
  1089.  
  1090. DWORD APIENTRY RasSetAutodialEnableW( DWORD, BOOL );
  1091.  
  1092. DWORD APIENTRY RasGetAutodialParamA( DWORD, LPVOID, LPDWORD );
  1093.  
  1094. DWORD APIENTRY RasGetAutodialParamW( DWORD, LPVOID, LPDWORD );
  1095.  
  1096. DWORD APIENTRY RasSetAutodialParamA( DWORD, LPVOID, DWORD );
  1097.  
  1098. DWORD APIENTRY RasSetAutodialParamW( DWORD, LPVOID, DWORD );
  1099. #endif
  1100.  
  1101.  
  1102. #ifdef UNICODE
  1103. #define RasDial                 RasDialW
  1104. #define RasEnumConnections      RasEnumConnectionsW
  1105. #define RasEnumEntries          RasEnumEntriesW
  1106. #define RasGetConnectStatus     RasGetConnectStatusW
  1107. #define RasGetErrorString       RasGetErrorStringW
  1108. #define RasHangUp               RasHangUpW
  1109. #define RasGetProjectionInfo    RasGetProjectionInfoW
  1110. #define RasCreatePhonebookEntry RasCreatePhonebookEntryW
  1111. #define RasEditPhonebookEntry   RasEditPhonebookEntryW
  1112. #define RasSetEntryDialParams   RasSetEntryDialParamsW
  1113. #define RasGetEntryDialParams   RasGetEntryDialParamsW
  1114. #define RasEnumDevices          RasEnumDevicesW
  1115. #define RasGetCountryInfo       RasGetCountryInfoW
  1116. #define RasGetEntryProperties   RasGetEntryPropertiesW
  1117. #define RasSetEntryProperties   RasSetEntryPropertiesW
  1118. #define RasRenameEntry          RasRenameEntryW
  1119. #define RasDeleteEntry          RasDeleteEntryW
  1120. #define RasValidateEntryName    RasValidateEntryNameW
  1121. #if (WINVER >= 0x401)
  1122. #define RasGetSubEntryHandle        RasGetSubEntryHandleW
  1123. #define RasConnectionNotification   RasConnectionNotificationW
  1124. #define RasGetSubEntryProperties    RasGetSubEntryPropertiesW
  1125. #define RasSetSubEntryProperties    RasSetSubEntryPropertiesW
  1126. #define RasGetCredentials           RasGetCredentialsW
  1127. #define RasSetCredentials           RasSetCredentialsW
  1128. #define RasGetAutodialAddress       RasGetAutodialAddressW
  1129. #define RasSetAutodialAddress       RasSetAutodialAddressW
  1130. #define RasEnumAutodialAddresses    RasEnumAutodialAddressesW
  1131. #define RasGetAutodialEnable        RasGetAutodialEnableW
  1132. #define RasSetAutodialEnable        RasSetAutodialEnableW
  1133. #define RasGetAutodialParam         RasGetAutodialParamW
  1134. #define RasSetAutodialParam         RasSetAutodialParamW
  1135. #endif
  1136. #else
  1137. #define RasDial                 RasDialA
  1138. #define RasEnumConnections      RasEnumConnectionsA
  1139. #define RasEnumEntries          RasEnumEntriesA
  1140. #define RasGetConnectStatus     RasGetConnectStatusA
  1141. #define RasGetErrorString       RasGetErrorStringA
  1142. #define RasHangUp               RasHangUpA
  1143. #define RasGetProjectionInfo    RasGetProjectionInfoA
  1144. #define RasCreatePhonebookEntry RasCreatePhonebookEntryA
  1145. #define RasEditPhonebookEntry   RasEditPhonebookEntryA
  1146. #define RasSetEntryDialParams   RasSetEntryDialParamsA
  1147. #define RasGetEntryDialParams   RasGetEntryDialParamsA
  1148. #define RasEnumDevices          RasEnumDevicesA
  1149. #define RasGetCountryInfo       RasGetCountryInfoA
  1150. #define RasGetEntryProperties   RasGetEntryPropertiesA
  1151. #define RasSetEntryProperties   RasSetEntryPropertiesA
  1152. #define RasRenameEntry          RasRenameEntryA
  1153. #define RasDeleteEntry          RasDeleteEntryA
  1154. #define RasValidateEntryName    RasValidateEntryNameA
  1155. #if (WINVER >= 0x401)
  1156. #define RasGetSubEntryHandle        RasGetSubEntryHandleA
  1157. #define RasConnectionNotification   RasConnectionNotificationA
  1158. #define RasGetSubEntryProperties    RasGetSubEntryPropertiesA
  1159. #define RasSetSubEntryProperties    RasSetSubEntryPropertiesA
  1160. #define RasGetCredentials           RasGetCredentialsA
  1161. #define RasSetCredentials           RasSetCredentialsA
  1162. #define RasGetAutodialAddress       RasGetAutodialAddressA
  1163. #define RasSetAutodialAddress       RasSetAutodialAddressA
  1164. #define RasEnumAutodialAddresses    RasEnumAutodialAddressesA
  1165. #define RasGetAutodialEnable        RasGetAutodialEnableA
  1166. #define RasSetAutodialEnable        RasSetAutodialEnableA
  1167. #define RasGetAutodialParam         RasGetAutodialParamA
  1168. #define RasSetAutodialParam         RasSetAutodialParamA
  1169. #endif
  1170. #endif
  1171.  
  1172. #ifdef __cplusplus
  1173. }
  1174. #endif
  1175.  
  1176.  
  1177. #include <poppack.h>
  1178.  
  1179. #pragma option pop
  1180. #endif // _RAS_H_
  1181.